<template>
  <div>
    <!-- 树形table
            1:数据要是树形结构(数据中要有children)
            2:在el-table 绑定  row-key='唯一标识的字段名'
    -->
    <el-table :data="list" row-key="id">
      <el-table-column type="index" label="序号" />
      <el-table-column prop="name" label="城市" />
    </el-table>
  </div>
</template>
<script>
export default {
  data() {
    return {
      list: [
        {
          id: '1',
          name: '广东省',
          children: [
            {
              id: '2',
              name: '广州'
            }
          ]
        }
      ]
    }
  }
}
</script>
<style></style>
